cmake_minimum_required(VERSION 2.8)
project(GN_PRO)


IF(NOT CMAKE_BUILD_TYPE)
  SET(CMAKE_BUILD_TYPE Release)
ENDIF()

set(CMAKE_CXX_FLAGS "-std=c++14 -O3")

list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
# Eigen
find_package(Eigen3 REQUIRED)


# 设置路径
include_directories(${EIGEN3_INCLUDE_DIR}
                    ${PROJECT_SOURCE_DIR}
                    ${PROJECT_SOURCE_DIR}/include)


# Ceres
find_package(Ceres REQUIRED)
include_directories(${CERES_INCLUDE_DIRS})


add_executable(ceres_solver ${PROJECT_SOURCE_DIR}/src/ceres_solver.cpp)
TARGET_LINK_LIBRARIES( ceres_solver
                       ${CERES_LIBRARIES})

